<template>
	<view class="page">
		<q-navbar title="你是人间四月天" :isBack="false"></q-navbar>
		<map id="map" class="map" :show-location="true" :latitude="latitude" :longitude="longitude"></map>
	</view>
</template>

<script>
	export default {
		components: {},
		props: {},
		data() {
			return {
				latitude: 23.099994,
				longitude: 113.324520,
				_mapContext: null
			}
		},
		watch: {},
		// 必须要在onReady生命周期，因为onLoad生命周期组件可能尚未创建完毕
		onReady() {
			this._mapContext = uni.createMapContext("map", this);
			console.log('_mapContext', this._mapContext)
			let markers = {
				
			}
			this._mapContext.addMarkers({
				markers,
				clear: false,
				complete(res) {
					console.log('addMarkers', res)
				}
			})
		},
		onLoad(options) {},
		onShow() {},
		methods: {}
	}
</script>

<style lang="scss" scoped>
	.page {
		height: 100vh;
		width: 100vw;

		.map {
			width: 100%;
			height: 1000rpx;
		}
	}
</style>